package someclass;

public class showMenuOptionList {
    public int[] optionNumber;
    public String[] optionName;
    public boolean showBooklist;
    public boolean couldReserveBook;
    public boolean showMovieDetails;
    public showMenuOptionList(){
        optionNumber = new int[]{'1', '2','3','4'};
        optionName = new String[]{"Membership details", "BookList","Reserve Book","MovieDetails"};
        showBooklist = false;
        couldReserveBook = false;
        showMovieDetails = false;
    }
    public String show() {
        String menuOptionlist ="";
        for(int i=0;i<optionNumber.length;i++){
            menuOptionlist +=optionNumber[i]-48+"."+optionName[i]+" ";
        }
        System.out.println(menuOptionlist);
        return menuOptionlist;
    }

    public String select(int i) {
        String returnString = "";
        switch (i){
            case 1:returnString = "Please talk to a Librarian. Thank you"; break;
            case 2:showBooklist = true;   break;
            case 3:couldReserveBook = true;     break;
            case 4:showMovieDetails = true;  break;
            default:returnString = "Select a valid option!!";
        }
        return returnString;
    }
}
